﻿<%@ Page Language="C#" MasterPageFile="~/Login.master" AutoEventWireup="true" CodeFile="ADList.aspx.cs" Inherits="ADList" Title="社区大全 - 我的社区 G维网" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceMainText" Runat="Server">
<div class="mainLeft">
<div class="mainLeftTop"></div>
<div class="mainLeftMiddle" style="position: relative">
<form id="Form1" runat="server">
<span class="orangetitle">社区大全</span>&nbsp;<br />
  <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:GoWLLConnectionString %>"></asp:SqlDataSource>
    <asp:Label ID="Label3" runat="server" Visible="False"></asp:Label>
    <asp:Label ID="Label4" runat="server" Visible="False"></asp:Label>
                
<table>
    <tr>
        <td valign="top" style="font-size:13px;">
            <div style="padding:2px;">
            <span style="margin:10px;">社区：<asp:TextBox ID="TextBox1" runat="server" Width="80px" BorderWidth="1" Height="16"></asp:TextBox>
            <asp:Button ID="Button1" runat="server" Text="查询" Height="20" OnClick="Button1_Click" /></span>
            
            <asp:LinkButton ID="LinkButton2" runat="server" OnClick="LinkButton2_Click">上一页</asp:LinkButton>
            <asp:LinkButton ID="LinkButton3" runat="server" OnClick="LinkButton3_Click">下一页</asp:LinkButton>
            </div>
            </td>
        <td align="center" valign="top">
            <asp:Label ID="Label1" runat="server" Text="点击社区预览" Font-Bold="True" Font-Size="16px" ForeColor="#FF8000"></asp:Label></td>
    </tr>
    <tr>
        <td valign="top">
             <asp:DataList ID="DataList1" runat="server" CellPadding="2" BorderWidth="1px" BorderColor="#FF6600" BackColor="#FFFFFF"
                 ForeColor="#333333" RepeatColumns="6" RepeatDirection="Horizontal" ShowFooter="False" ShowHeader="False" CellSpacing="2">
                 <AlternatingItemStyle BackColor="#EEEEEE" Width="50px" HorizontalAlign="Center"/>
                 <ItemStyle Width="50px" HorizontalAlign="Center" BackColor="#EEFF88"/>
                 <ItemTemplate>
                     <asp:LinkButton ID="LinkButton1" runat="server" CommandName='<%# Eval("ID") %>' OnClick="LinkButton1_Click" Font-Size="11px" ForeColor="#FF8800"><%# Eval("Title") %></asp:LinkButton>
                 </ItemTemplate>
             </asp:DataList>
             <br />
            <table width="100%" cellpadding="1" cellspacing="2" border="0" style="font-size:13px;">
                <tr>
                    <td colspan="2">
                        <asp:Label ID="Label2" runat="server" Text="Label" Font-Bold="True" ForeColor="#FF8000"></asp:Label>社区广告位置：
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:RadioButton ID="RadioButton1" runat="server" GroupName="adpos" /></td>
                    <td>
                        <asp:RadioButton ID="RadioButton2" runat="server" GroupName="adpos" /></td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:RadioButton ID="RadioButton3" runat="server" GroupName="adpos" /></td>
                </tr>
                <tr>
                    <td colspan="2">
                        发布时间：<asp:TextBox ID="TextBox2" runat="server" Width="65px" Height="14px" ReadOnly="true" BorderWidth="0"></asp:TextBox>
                        至 <asp:TextBox ID="TextBox3" runat="server" Width="65px" Height="14px" ReadOnly="true" BorderWidth="0"></asp:TextBox>
                        共 <asp:TextBox ID="TextBox4" runat="server" Width="33px" Height="14px" ReadOnly="true" BorderWidth="0"></asp:TextBox>
                        天
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        预计展示：<asp:TextBox ID="TextBox5" runat="server" Width="65px" Height="14px" ReadOnly="true" BorderWidth="0"></asp:TextBox>
                        千次／天 共 <asp:TextBox ID="TextBox6" runat="server" Width="65px" Height="14px" ReadOnly="true" BorderWidth="0"></asp:TextBox>
                        千次
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align: center">
                   
<script language="javascript">
document.write("<style type=text/css>"
+"td.d0{height:17px;width:45px;color:#FF0000; border:1px solid #FFFFFF; text-align:center;background-color:#FFCC33;font-weight:bold;padding-top:3px;}"
+"td.d1{height:17px;width:45px;color:#FF6600; border:1px solid #FFFFFF; text-align:center;background-color:#FFCC33;font-weight:bold;padding-top:3px;}"
+"td.d{height:17px;color:#FF8800; border:1px solid #FFFFFF; text-align:center; background-color:#DDEE66;cursor:pointer;}"
+"td.g{height:17px;;color:#888888; border:1px solid #FFFFFF; text-align:center; background-color:#EEEEEE;}"
+"td.c{height:17px;color:#FF0000; border:1px solid #FFFFFF; text-align:center; background-color:#EEEEEE;font-weight:bold;}"
+"td.ss{height:17px;color:#FFFF00; border:1px solid #FFFFFF; text-align:center; background-color:#FF5555;cursor:pointer;font-weight:bold;}"
+"td.s{height:17px;color:#FFFF00; border:1px solid #FFFFFF; text-align:center; background-color:#FF8888;cursor:pointer;font-weight:bold;}"
+"</style>");
var ssid=70;
var ds="<%=DateTime.Now.ToShortDateString() %>".split("-");
ds[1]=ds[1]-1;
var day=(new Date(ds[0],ds[1],ds[2])).getDay();
ds[2]-=day;
var t="<tr><td class=d0>星期日</td><td class=d1>一</td><td class=d1>二</td><td class=d1>三</td><td class=d1>四</td><td class=d1>五</td><td class=d1>六</td></tr>";
var i,j,date,cn,d,dn=0;
for(i=0;i<10;i++)
{
t=t+"<tr>";
for(j=0;j<7;j++)
{
date=new Date(ds[0],ds[1],ds[2]+dn);
d=date.getDate();
if(d==1)d="<b>"+(date.getMonth()+1)+"月"+d+"</b>";
if(dn==day)
cn="c";
else if(dn<(day + 2))
cn="g";
else
{
cn="d";
}
t=t+"<td title='"+date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate()+"' class="+cn+" id=D"+dn+" ondblclick=startSelect(this) onclick=endSelect(this)>"+d+"</td>";
dn++;
}
t=t+"</tr>";
}
document.write("<table style='border:2px solid #FF6600;font-size:13px;' cellspacing=0 cellpadding=0 border=1>"+t+"</table>");
function ban(sd,ed)
{
var i,d,k=false;
for(i=0;i<70;i++)
{
d=document.getElementById("D"+i);
if(d.title==sd)
{
k=true;
}
if(k)
{
d.className="g";
}
if(d.title==ed)
{
break;
}
}
}

function startSelect(o)
{
var i,d;
if(o.className=="d" || o.className=="ss" || o.className=="s")
{
for(i=0;i<70;i++)
{
d=document.getElementById("D"+i);
if(d.className=="ss" || d.className=="s")
d.className="d";
}
o.className="ss";
ssid=Number(o.id.substr(1));
document.getElementById("ctl00_ContentPlaceMainText_TextBox2").value=o.title;
document.getElementById("ctl00_ContentPlaceMainText_TextBox3").value=o.title;
document.getElementById("ctl00_ContentPlaceMainText_TextBox4").value="1";
document.getElementById("ctl00_ContentPlaceMainText_TextBox6").value=document.getElementById("ctl00_ContentPlaceMainText_TextBox5").value;
}
}
function endSelect(o)
{
var cn="s";
var dn=1;
var i,d;
if(Number(o.id.substr(1))>ssid)
{
for(i=ssid+1;i<70;i++)
{
d=document.getElementById("D"+i);
if(d.className=="g")
{
cn="d";
}
if(d.className!="g")
{
d.className=cn;
if(cn=="s")dn++;
}
if(d==o)
{
cn="d";
}
}
document.getElementById("ctl00_ContentPlaceMainText_TextBox3").value=o.title;
document.getElementById("ctl00_ContentPlaceMainText_TextBox4").value=dn;
document.getElementById("ctl00_ContentPlaceMainText_TextBox6").value=document.getElementById("ctl00_ContentPlaceMainText_TextBox5").value*dn;
}
else
{
startSelect(o);
}
}
function reban(js)
{
var i;
ssid=70;
for(i=day+2;i<70;i++)
{
document.getElementById("D"+i).className="d";
}
document.getElementById("jsBan").src=js;
}
</script>
<script id="jsBan"></script>
                    
                    
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center" colspan="2">
                        <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/addto.gif" OnClick="ImageButton1_Click" /></td>
                </tr>
            </table>
            
        </td>
        <td align="right" valign="top" width="210">
            <asp:DataList ID="DataList2" runat="server" ShowFooter="False" ShowHeader="False">
                <ItemTemplate>
                    <iframe width="200" height="340" marginwidth="0" marginheight="5" scrolling="no" frameborder="0" src="<%# "http://wml.gowll.com/gowll2.htm?"+Eval("url") %>"></iframe></td>
                </ItemTemplate>
            </asp:DataList>

            <table width="95%" style="border:1px solid #FF6600;font-size:13px;margin-top:10px;" bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" border="1">
                <tr>
                    <td colspan="2" align="center" class="c" >图 例</td>
                </tr>
                <tr>
                    <td class="d">可购买</td>
                    <td class="g">已售出</td>
                </tr>
                <tr>
                    <td class="s">您的选择</td>
                    <td class="ss">开始日期</td>
                </tr>
                <tr>
                    <td colspan="2" align="left" style="font-size:12px;padding:3px;border-width:0px;" >双击相应日期设置广告开始发布日期，单击相应设置结束。</td>
                </tr>
            </table>
        </td>
    </tr>
 </table>
            </form>
</div>
<div class="mainLeftBottom"></div> 

</div>
</asp:Content>


